<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="../../commons/taglibs.jsp"%>
<%@ include file="../../commons/list.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta charset="utf-8">
  <title>汽车坐位配置详情</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <style type="text/css">
  	.layui-input{
  		width: 150px;
  	}
  	.layui-form-pane .layui-form-label{
  		width: 160px;
  	}
  </style>
</head>
	
<body>
<div>
	<div style="padding: 100px;padding-top: 0px">
		<form class="layui-form layui-form-pane"  action="">
			<input type="hidden" id='entityId' name='entityId' value="${carDetailSeatConfig.id }">
			<input type="hidden" name='carmodelid' value="${carmodelid }">
			
	   		 <div class="layui-form-item">
			     <label class="layui-form-label">真皮/仿皮座椅</label>
			     <div class="layui-input-inline">
			         <input type="text" name="genuineleather" id='genuineleather' placeholder="请输入真皮/仿皮座椅" value="${carDetailSeatConfig.genuineleather }" class="layui-input">
			     </div>
			     
			     <label class="layui-form-label">座椅高低调节</label>
			     <div class="layui-input-inline">
			         <input type="text" name="heightadjustment" id='heightadjustment' placeholder="请输入座椅高低调节" value="${carDetailSeatConfig.heightadjustment }" class="layui-input">
			     </div>
			 </div>
			 
			 <div class="layui-form-item">
			     <label class="layui-form-label">腰部支撑调节</label>
			     <div class="layui-input-inline">
			         <input type="text" name="lumbarsupport" id='lumbarsupport' placeholder="请输入腰部支撑调节" value="${carDetailSeatConfig.lumbarsupport }" class="layui-input">
			     </div>
			     
			     <label class="layui-form-label">肩部支撑调节</label>
			     <div class="layui-input-inline">
			         <input type="text" name="shouldersupport" id='shouldersupport' placeholder="请输入肩部支撑调节" value="${carDetailSeatConfig.shouldersupport }" class="layui-input">
			     </div>
			 </div>
			 
			 <div class="layui-form-item">
			     <label class="layui-form-label">主/副驾驶座电动调节</label>
			     <div class="layui-input-inline">
			         <input type="text" name="driverseatelectricadjustment" id='driverseatelectricadjustment' placeholder="请输入主/副驾驶座电动调节" value="${carDetailSeatConfig.driverseatelectricadjustment }" class="layui-input">
			     </div>
			     
			     <label class="layui-form-label">第二排靠背角度调节</label>
			     <div class="layui-input-inline">
			         <input type="text" name="secondrowofbackrestangleadjustment" id='secondrowofbackrestangleadjustment' placeholder="请输入第二排靠背角度调节" value="${carDetailSeatConfig.secondrowofbackrestangleadjustment }" class="layui-input">
			     </div>
			 </div>

			  <div class="layui-form-item">
			     <label class="layui-form-label">第二排座椅移动</label>
			     <div class="layui-input-inline">
			         <input type="text" name="secondseatmove" id='secondseatmove' placeholder="请输入第二排座椅移动" value="${carDetailSeatConfig.secondseatmove }" class="layui-input">
			     </div>
			     
			     <label class="layui-form-label">后排座椅电动调节</label>
			     <div class="layui-input-inline">
			         <input type="text" name="rearseatelectricadjustment" id='rearseatelectricadjustment' placeholder="请输入后排座椅电动调节" value="${carDetailSeatConfig.rearseatelectricadjustment }" class="layui-input">
			     </div>
			 </div>
			 
			 
			 <div class="layui-form-item">
			     <label class="layui-form-label">电动座椅记忆</label>
			     <div class="layui-input-inline">
			         <input type="text" name="electricseatmemory" id='electricseatmemory' placeholder="请输入电动座椅记忆" value="${carDetailSeatConfig.electricseatmemory }" class="layui-input">
			     </div>
			     
			     <label class="layui-form-label">前/后排座椅加热</label>
			     <div class="layui-input-inline">
			         <input type="text" name="heating" id='heating' placeholder="请输入前/后排座椅加热" value="${carDetailSeatConfig.heating }" class="layui-input">
			     </div>
			 </div>
			 
			 <div class="layui-form-item">
			     <label class="layui-form-label">前/后排座椅通风</label>
			     <div class="layui-input-inline">
			         <input type="text" name="ventilation" id='ventilation' placeholder="请输入前/后排座椅通风" value="${carDetailSeatConfig.ventilation }" class="layui-input">
			     </div>
			     
			     <label class="layui-form-label">前/后排座椅按摩</label>
			     <div class="layui-input-inline">
			         <input type="text" name="massage" id='massage' placeholder="请输入前/后排座椅按摩" value="${carDetailSeatConfig.massage }" class="layui-input">
			     </div>
			 </div>
			 
			 <div class="layui-form-item">
			     <label class="layui-form-label">后排座椅放倒方式</label>
			     <div class="layui-input-inline">
			         <input type="text" name="backdowmmode" id='backdowmmode' placeholder="请输入后排座椅放倒方式" value="${carDetailSeatConfig.backdowmmode }" class="layui-input">
			     </div>
			     
			     <label class="layui-form-label">第三排座椅</label>
			     <div class="layui-input-inline">
			         <input type="text" name="thirdrowseat" id='thirdrowseat' placeholder="请输入第三排座椅" value="${carDetailSeatConfig.thirdrowseat }" class="layui-input">
			     </div>
			 </div>
			 
			 <div class="layui-form-item">
			     <label class="layui-form-label">前/后中央扶手</label>
			     <div class="layui-input-inline">
			         <input type="text" name="handrail" id='handrail' placeholder="请输入前/后中央扶手" value="${carDetailSeatConfig.handrail }" class="layui-input">
			     </div>
			     
			     <label class="layui-form-label">后排杯架</label>
			     <div class="layui-input-inline">
			         <input type="text" name="rearglassframe" id='rearglassframe' placeholder="请输入后排杯架" value="${carDetailSeatConfig.rearglassframe }" class="layui-input">
			     </div>
			 </div>
			 
			 <div class="layui-form-item" style="width: 85%;padding-left: 200px;padding-top: 30px">
			    <div class="layui-input-block">
			      <button class="layui-btn" id='tjsub' lay-submit lay-filter="formDemo">立即提交</button>
		    	</div>
		  	</div>
		</form>
	</div>
 </div>
<script>

layui.use(['form'], function () {
    var $ = layui.jquery
        ,form = layui.form
        ,layer= layui.layer;
    
     var form = layui.form;
	  
	  //监听提交
	  form.on('submit(formDemo)', function(data){
		  var field = JSON.parse(JSON.stringify(data.field));
		  var img = field.img;
		  field.img = $("#imgAddress").val();
	  	//提交成功后禁用按钮
		$("#tjsub").css("pointer-events","none"); 
	    //layer.msg(JSON.stringify(data.field));
	    $.post("<%=basePath%>/controller/carDetailSeatConfig/save",field,function (data){
	    	if(data == '0'){
	    		$("#tjsub").css("pointer-events","auto");
	    		layer.msg('提交成功', {time:1000}); 
	    		setTimeout("window.location.reload();",1500); 
	    	}else{
	    		$("#tjsub").css("pointer-events","auto");
	    		layer.msg('提交失败', {time:1000}); 
	    	}
	    })
	    return false;
	  });
    
});

</script>
</body>
</html>
